In [1]:
# Great but no patience to read that!
# I've collected that data in a csv file
Download the data from here: https://gist.github.com/delip/c85d1d5757ad9b96f6d6
In [3]:
!cat top-grossing-games.csv
In [4]:
# Let's read that data in
import pandas as pd
In [5]:
top_games = pd.read_csv('top-grossing-games.csv')
In [6]:
top_games.head()
Out[6]:
In [7]:
# let's see how this looks
# We will use Seaborn
import seaborn as sns
In [8]:
ax = sns.barplot(data=top_games, x='Sales (billions)', y='Game')
In [9]:
# doh. we don't have matplotlib inline
%matplotlib inline
In [10]:
ax = sns.barplot(data=top_games, x='Sales (billions)', y='Game')
In [11]:
# decent but needs some tweaks. Change the color palette. reorder the data.
In [12]:
data = top_games.sort('Sales (billions)', ascending=False)
ax = sns.barplot(data=data, x='Sales (billions)', y='Game', palette='Blues_d')
In [ ]:
# And we're done. Have a nice day!